package problema006;

public class SumSqDiff {
	
	public static void main(String[] args){
		System.out.println(sumSquareDifference());
	}

	public static long sumSquareDifference(){
		long cuadsum = 0, sumcuad = 0, cuad = 0;
		for(int j = 1; j < 101; j++){
			cuad = j * j;
			sumcuad += cuad;
			cuadsum += (long) j;
		}
		cuadsum *= cuadsum;
		return cuadsum - sumcuad;
	}
	
}
